package com.qf.joint.service.impl;

import com.github.pagehelper.PageInfo;
import com.qf.joint.dao.JobhunterDao;
import com.qf.joint.pojo.Jobhunter;
import com.qf.joint.service.JobhunterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service("/jobhunterService")
public class JobhunterServiceimpl implements JobhunterService {
    @Autowired
    private JobhunterDao jobhunterDao;

    @Override
    public Jobhunter selectById(int id) {
        return null;
    }

    @Override
    public List<Jobhunter> selectAll() {
        return jobhunterDao.selectAll();
    }

    @Override
    public PageInfo<Jobhunter> getJobhunterByPage(int page, int limit) {
        return jobhunterDao.getJobhunterByPage(page,limit);
    }

    @Override
    public List<Jobhunter> selectByCon(String phone, String pass) {
        return jobhunterDao.selectByCon(phone,pass);
    }

    @Override
    public int insertOne(Jobhunter jobhunter) {
        return jobhunterDao.insertOne(jobhunter);
    }

    @Override
    public int updateOne(Jobhunter jobhunter) {
        return jobhunterDao.updateOne(jobhunter);
    }

    @Override
    public int deleteOne(List<String> list) {
        return jobhunterDao.deleteOne(list);
    }

    /*根据手机号查询jobhunter0表中 id,姓名、头像、   结果为1条*/
    @Override
    public Jobhunter selectByPhone(String phonenum) {
        return jobhunterDao.selectByPhone(phonenum);
    }

    /*点击姓名：显示简历：查询/姓名  /优势  */
    @Override
    public Jobhunter selectByName(int id) {
        return jobhunterDao.selectByName(id);
    }

    /*点击工作经历，进行查询*/
    @Override
    public Jobhunter selectjob(int id) {
        return jobhunterDao.selectjob(id);
    }


    /*点击工作经历，进行新增*/
    @Override
    public int add(Jobhunter jobhunter) {
        return jobhunterDao.add(jobhunter);
    }

    /*点击工作经历，进行修改*/
    @Override
    public int update(Jobhunter jobhunter) {
        return jobhunterDao.update(jobhunter);
    }

    /*点击设置：点击账号绑定，查询手机号 jobhunter/findphone  */
    @Override
    public Jobhunter selectPhone(int id) {
        return jobhunterDao.selectPhone(id);
    }

    /*修改手机号jobhunter/changephone*/
    @Override
    public int updatePhone(Jobhunter jobhunter) {
        return jobhunterDao.updatePhone(jobhunter);
    }
}
